package com.xxgc.eow.generator;

/**
 * @program: ExhibitionOfWorks
 * @description:
 * @author: Mr.Abel SJY
 * @Email thanksjava@qq.com
 * @create: 2023-05-07 20:59
 **/

import com.xxgc.eow.config.YAMLPropertySourceFactory;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Data   //代替手动输入get/set
@Component
//设置yaml路径及使用解析的实现类文件
@PropertySource(value = "classpath:application-dev.yml", factory = YAMLPropertySourceFactory.class)
@ConfigurationProperties(prefix = "spring.datasource") //绑定yaml
public class DataSource {
    private String url;//数据库地址
    private String username;//用户名
    private String password;//密码
}


